﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace QLRapChieuPhim
{
    public partial class CaChieu : UserControl
    {
        public CaChieu()
        {
            InitializeComponent();
        }

        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            String sql = "sever=.; database=QuanLyRapChieuPhim; Integrated Security=True";
            SqlConnection cn = new SqlConnection(sql);
            SqlDataAdapter da = new SqlDataAdapter("Select *from CaChieu", cn);
            
            DataTable dt=new DataTable();
            da.Fill(dt);
            da.Dispose();
            dataGridView1.DataSource = dt;
        }

        private void CaChieu_Load(object sender, EventArgs e)
        {

        }
    }
}
